//package Util;
//
//
//import org.osgeo.proj4j.*;
//
//public class eo4jConversionUtil {
//    public static PointDTO convert(PointDTO point){
//        CRSFactory crsFactory = new CRSFactory();//后续可以使用springboot加载,减少内存占用
//        // 定义源坐标系统和目标坐标系统
//        String sourceCRSDefinition = "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs";
//        String targetCRSDefinition = "+proj=longlat +datum=WGS84 +no_defs";
//
//        ProjCoordinate sourceCoord = new ProjCoordinate(point.getX1(),point.getY1());
//        ProjCoordinate sourceCoord2 = new ProjCoordinate(point.getX2(),point.getY2());
//
//
//        // 进行坐标转换
//        CoordinateReferenceSystem sourceCRS = crsFactory.createFromParameters("sourceCRS", sourceCRSDefinition);
//        CoordinateReferenceSystem targetCRS = crsFactory.createFromParameters("targetCRS", targetCRSDefinition);
//
//        ProjCoordinate targetCoord = new ProjCoordinate();
//        CoordinateTransform transform = new BasicCoordinateTransform(sourceCRS, targetCRS);
//        transform.transform(sourceCoord, targetCoord);
//        point.setX1(targetCoord.x);
//        point.setY1(targetCoord.y);
//
//        transform.transform(sourceCoord2, targetCoord);
//
//        point.setX2(targetCoord.x);
//        point.setY2(targetCoord.y);
//
//        return point;
//    }
//}
